using System;
using System.Runtime.InteropServices;

namespace BarcodePrinting.Postek
{
	public static class PostekDll
	{
		[DllImport("WINPSK.dll")]
		internal static extern int OpenPort(string sPrinterName);

		[DllImport("WINPSK.dll")]
		internal static extern int ClosePort();

		[DllImport("WINPSK.dll")]
		internal static extern int PTK_SetPrintSpeed(uint nPrintSpeed);

		[DllImport("WINPSK.dll")]
		internal static extern int PTK_SetDarkness(uint id);

		[DllImport("WINPSK.dll")]
		internal static extern int PTK_PrintLabel(uint number, uint cpnumber);

		[DllImport("WINPSK.dll")]
		internal static extern int PTK_DrawTextTrueTypeW(int x, int y, int FHeight, int FWidth, string FType, int Fspin, int FWeight, bool FItalic, bool FUnline, bool FStrikeOut, string id_name, string data);

		[DllImport("WINPSK.dll")]
		internal static extern int PTK_DrawBarcode(uint px, uint py, uint pdirec, string pCode, uint NarrowWidth, uint pHorizontal, uint pVertical, char ptext, string pstr);

		[DllImport("WINPSK.dll")]
		internal static extern int PTK_SetLabelHeight(uint nLabelHeight, uint nGapHeight);

		[DllImport("WINPSK.dll")]
		internal static extern int PTK_SetLabelWidth(uint nLabelWidth);

		[DllImport("WINPSK.dll")]
		internal static extern int PTK_ClearBuffer();

		[DllImport("WINPSK.dll")]
		internal static extern int PTK_DrawRectangle(uint px, uint py, uint thickness, uint pEndx, uint pEndy);

		[DllImport("WINPSK.dll")]
		internal static extern int PTK_DrawLineOr(uint px, uint py, uint pLength, uint pHeight);

		[DllImport("WINPSK.dll")]
		internal static extern int PTK_DisableBackFeed();

		[DllImport("WINPSK.dll")]
		internal static extern int PTK_EnableBackFeed(uint distance);
	}
}
